package com.hundredapp.oa.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "oa_contract_subject", catalog = "oa_demo")
public class OaElect implements java.io.Serializable{
	private Integer id;
	private OaContract oaContract;
	private OaSubject oaSubject;
	private Double price;
	private Integer ispre;

	@Id
	@GeneratedValue(strategy = javax.persistence.GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "price", length = 45)
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subject_id")
	public OaSubject getOaSubject() {
		return oaSubject;
	}

	public void setOaSubject(OaSubject oaSubject) {
		this.oaSubject = oaSubject;
	}

	@ManyToOne(fetch = FetchType.LAZY, optional=false)
	@JoinColumn(name = "contract_id")
	public OaContract getOaContract() {
		return oaContract;
	}

	public void setOaContract(OaContract oaContract) {
		this.oaContract = oaContract;
	}

	@Column(name = "ispre")
	public Integer getIspre() {
		return ispre;
	}

	public void setIspre(Integer ispre) {
		this.ispre = ispre;
	}
	
}
